<template>
  <div class="container">
    <!-- 面包屑导航 -->
    <div class="breadcrumb">
      <el-breadcrumb separator="">
        <el-breadcrumb-item>
          <div class="div1">商品管理</div>
        </el-breadcrumb-item>
        <el-breadcrumb-item>
          <div class="div2">类目管理</div>
        </el-breadcrumb-item>
      </el-breadcrumb>
    </div>
    <!-- 面包屑导航 -->
    <div class="Box">
      <div class="table_tab">
        <div class="inquiry">
          <div class="headerbox">
            <div class="header">
              <div class="title_left"></div>
              类目管理
            </div>
            <div class="headerbox_right">
              <!-- <el-button size="mini" type="primary" @click="refresh()"
                >刷新</el-button
              > -->
              <!-- <el-button size="mini" @click="back()">返回</el-button> -->
            </div>
          </div>
          <div class="headerTitle">数据筛选</div>
          <el-form
            :inline="true"
            ref="queryForm"
            :model="queryForm"
            label-width=""
            size="mini"
          >
            <el-form-item label="类目名称">
              <el-input
                placeholder="请输入类目名称"
                clearable
                :maxlength="20"
                v-model.trim="queryForm.categoryName"
              ></el-input>
            </el-form-item>
            <el-form-item label="编号">
              <el-input
                placeholder="请输入编号"
                clearable
                v-model="queryForm.categoryNo"
                oninput="value=value.replace(/[^0-9.]/g,'')"
                :maxLength="2"
              ></el-input>
            </el-form-item>

            <el-form-item label="状态">
              <el-select
                v-model="queryForm.status"
                placeholder="请选择"
                clearable
                @change="selectState"
              >
                <el-option
                  v-for="items in positionList"
                  :key="items.value"
                  :label="items.name"
                  :value="items.value"
                ></el-option>
              </el-select>
            </el-form-item>
            <el-form-item>
              <el-button
                @click="searchEvent()"
                plain
                v-on:keyup.enter="searchEvent"
                type="primary"
                >搜索</el-button
              >
              <el-button plain @click="reset()" type="primary">重置</el-button>
            </el-form-item>
          </el-form>
        </div>
        <div class="inquiryTab">
          <div class="inquiryTab_header">
            <div class="tabTitle">列表数据</div>
            <el-button
              @click="addClassify()"
              type="primary"
              v-if="parArray.indexOf('addClassify') != -1"
              >新增分类</el-button
            >
          </div>
          <div class="table">
            <el-table
              row-key="id"
			  v-loading="loading"
              lazy
              :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
              :data="tableData.list"
              :header-cell-style="{
                background: '#f8f8f8',
                textAlign: 'left',
              }"
              style="width: 100%"
              :toggleRowExpansion="{ expanded: true }"
              ref="theTable"
            >
              <el-table-column
                label="类目名称"
                min-width="80"
                prop="categoryName"
              >
              </el-table-column>
              <el-table-column label="编号" prop="categoryNo" min-width="80">
              </el-table-column>

              <el-table-column label="级别" prop="levelDesc"> </el-table-column>
              <el-table-column width="90" label="状态" prop="status">
                <template slot-scope="props">
                  <p :class="props.row.status == 'A' ? 'green' : 'red'">
                    {{ props.row.statusDesc }}
                  </p>
                </template>
              </el-table-column>
              <el-table-column
                width="200"
                label="更新日期"
                prop="updatedTime"
                label-class-name="updatedTime"
              >
                <template slot-scope="props">
                  <div style="text-align: center">
                    {{ props.row.updatedTime }}
                  </div>
                </template>
              </el-table-column>
              <el-table-column
                label="操作"
                width="200"
                fixed="right"
                label-class-name="updatedTime"
              >
                <template slot-scope="props">
                  <div>
                    <p
                      v-if="
                        parArray.indexOf('subordinate') != -1 &&
                        props.row.level != 3
                      "
                      class="btnp"
                      @click="compile(props.row, 1)"
                    >
                      新增下级
                    </p>
                    <p
                      class="btnp"
                      @click="setState(props.row)"
                      v-if="
                        props.row.status == 'S' &&
                        parArray.indexOf('forbidden') != -1
                      "
                    >
                      启用
                    </p>
                    <p
                      class="btnp"
                      @click="getGoodsNum(props.row)"
                      v-if="
                        props.row.status == 'A' &&
                        parArray.indexOf('categoryEnable') != -1
                      "
                    >
                      禁用
                    </p>

                    <p
                      v-if="parArray.indexOf('classifyEdit') != -1"
                      class="btnp"
                      @click="compile(props.row, 2)"
                    >
                      编辑
                    </p>
                  </div>
                </template>
              </el-table-column>
            </el-table>
          </div>
        </div>
      </div>
    </div>
    <!-- 分页start -->
    <div class="page" v-if="tableData.totalNum > 0">
      <div class="block">
        <el-pagination
          @size-change="handleSizeChange"
          @current-change="handleCurrentChange"
          :current-page="pageNo"
          :page-sizes="[10, 20, 50, 100, 200]"
          :page-size="pageSize"
          layout="total, sizes, prev, pager, next, jumper"
          :total="tableData.totalNum"
          prev-text="上一页"
          next-text="下一页"
        >
        </el-pagination>
      </div>
    </div>
    <!-- 分页end -->
    <!-- 新增分类对话框 -->
    <el-dialog
      title="新增分类"
      :close-on-click-modal="false"
      append-to-body
      :visible.sync="addClassifyDialogVisible"
      width="30%"
      :before-close="handleCloseAddClassify"
    >
      <el-form ref="form" :rules="rules" :model="form" label-width="100px">
        <!-- <el-form-item label="编号：" prop="categoryNo">
          <el-input
           :disabled="true"
            placeholder="请输入编号"
            oninput="value=value.replace(/[^0-9.]/g,'')"
            :maxLength="2"
            v-model.trim="form.categoryNo"
          ></el-input>
        </el-form-item> -->
        <el-form-item label="分类名称：" prop="categoryName">
          <el-input
            placeholder="请输入分类名称"
            v-model.trim="form.categoryName"
          ></el-input>
        </el-form-item>
        <el-form-item label="上级分类：">
          <el-cascader
            clearable
            v-model="form.parentId"
            :options="options"
            :props="{
              label: 'categoryName',
              value: 'id',
              expandTrigger: 'hover',
              checkStrictly: true,
            }"
            @change="handleChange"
          ></el-cascader>
        </el-form-item>
        <el-form-item label="状态：" prop="status">
          <el-radio-group v-model="form.status">
            <el-radio label="A">启用</el-radio>
            <el-radio label="S">禁用</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item>
          <div style="float: right">
            <el-button @click="addClassifyDialogVisible = false"
              >取消</el-button
            >
            <el-button type="primary" @click="classifyAdd('form')"
              >提交</el-button
            >
          </div>
        </el-form-item>
      </el-form>
    </el-dialog>
    <!-- 新增分类对话框结束 -->
    <!-- 新增下级对话框 -->
    <el-dialog
      :title="btnText"
      :close-on-click-modal="false"
      append-to-body
      :visible.sync="toInfoDialogVisible"
      width="30%"
      :before-close="handleCloseToInfo"
      v-if="toInfoDialogVisible"
    >
      <el-form
        ref="ruleForm"
        :rules="ruleFormRules"
        :model="ruleForm"
        label-width="100px"
      >

        <el-form-item label="编号：" prop="categoryNo" v-if="btnText=='编辑'">
          <el-input
          :disabled="true"
            oninput="value=value.replace(/[^0-9.]/g,'')"
            v-model.trim="ruleForm.categoryNo"
            :maxLength="2"
          ></el-input>
        </el-form-item>
        <el-form-item label="分类名称：" prop="categoryName">
          <el-input v-model.trim="ruleForm.categoryName"></el-input>
        </el-form-item>
        <el-form-item label="上级分类：">
          <el-cascader
            :disabled="forbidden"
            v-model="ruleForm.value"
            :options="rowList"
            :props="{
              label: 'categoryName',
              value: 'id',
              expandTrigger: 'hover',
              checkStrictly: true,
            }"
            @change="handleChangeSubordinate"
          ></el-cascader>
        </el-form-item>
        <el-form-item label="状态：" prop="status">
          <el-radio-group v-model="ruleForm.status">
            <el-radio label="A">启用</el-radio>
            <el-radio label="S">禁用</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item>
          <div style="float: right">
            <el-button @click="toInfoDialogVisible = false">取消</el-button>
            <el-button type="primary" @click="addSubordinate('ruleForm')"
              >提交</el-button
            >
          </div>
        </el-form-item>
      </el-form>
    </el-dialog>

    <!-- 新增下级对话框结束 -->
    <!-- 禁用类目时提示还有多少条数据 -->
    <el-dialog
        title="提示"
        :visible.sync="dialogVisibleGoods"
        append-to-body
        width="30%"
        :before-close="handleClose">
        <span>该类目下还有<span style="color:red">{{goodsNumber}}个</span>商品，请先下架商品！</span>
          <div class="btnClass">
              <el-button @click="dialogVisibleGoods = false">取 消</el-button>
              <el-button type="primary" @click="dialogVisibleGoods = false">确 定</el-button>
          </div>
      </el-dialog>
  </div>
</template>

<script>
import VDistpicker from "v-distpicker";
export default {
  watch: {


  },
  components: {
    VDistpicker,
  },
  data () {
    return {
      goodsNumber:'',
      dialogVisibleGoods:false,
      disabledStatus:false,//是否禁用
      toInfoDialogVisible: false,//新增下级/编辑对话框
      addClassifyDialogVisible: false,//新增分类对话框
      date: "",
      rowId: "",//列表行ID
      rowList: [],
      selectedOptions: [],
      position: [
        {
          label: "正常",
          value: 'A'
        },
        {
          label: "停用",
          value: 'S'
        },
        {
          label: "删除",
          value: 'X'
        }
      ],
      options: [],
      btnText: "",
      queryForm: {
        categoryNo: "",
        categoryName: "",
        status: ""
      },
      // 列表树形控件配置参数
      defaultProps: {
        children: 'children',
        categoryName: 'categoryName'
      },
      // 新增下级
      ruleForm: {
        categoryNo: "",
        categoryName: "",
        parentId: "",
        status: "A",
        value: 0,
      },
      cascaderValue: "",
      ruleFormRules: {
        categoryNo: [
          { required: false, message: '请输入编号', trigger: 'blur' },
          { min: 1, max: 20, message: '长度在 1 到 20 个字符', trigger: 'blur' }
        ],
        categoryName: [
          { required: true, message: '请输入分类名称', trigger: 'change' },
          { min: 1, max: 20, message: '长度在 1 到 20 个字符', trigger: 'blur' }
        ],
        status: [
          { required: true, message: '请选择状态', trigger: 'change' }
        ]
      },
      // 新增分类
      form: {
        categoryNo: "",
        categoryName: "",
        parentId: "",
        status: "A"
      },
      rules: {
        categoryNo: [
          { required: false, message: '请输入编号', trigger: 'blur' },
          { min: 1, max: 20, message: '长度在 1 到 20 个字符', trigger: 'blur' }
        ],
        categoryName: [
          { required: true, message: '请输入分类名称', trigger: 'change' },
          { min: 1, max: 20, message: '长度在 1 到 20 个字符', trigger: 'blur' }
        ],
        status: [
          { required: true, message: '请选择状态', trigger: 'change' }
        ]
      },
      forbidden: false,//是否禁用
      pageNo: 1,
      pageSize: 10,
      tableData: [],
	  loading:false,
      tree: [],
      orgCode: "",
      limits: "",
      parArray: [],
      height: "500px",
      positionList: [
        {
          name: "启用",
          value: 'A'
        },
        {
          name: "禁用",
          value: 'S'
        }
      ],//职位列表数据
      expandRow: [],
    };
  },
  mounted () {
    let self = this;
    let ph = document.documentElement.clientHeight;
    self.height = ph - 350 + "px";
    window.onresize = function () {
      let ph = document.documentElement.clientHeight;
      self.height = ph - 350 + "px";
    };
  },
  created () {
    this.getStaffList();


    // 权限设定判断
    this.limits = JSON.parse(sessionStorage.getItem('limit'))
    const params = this.limits.buttonTreeDto.filter(
      (item) => item.menuCode === 'categoryManage'//菜单管理里面的菜单编码
    )
    params[0].buttonList.forEach((item) => {
      this.parArray.push(item.code)
    })
    console.log(this.parArray)
    // 权限设定判断
    document.onkeydown = (e) => {
      let key = window.event.keyCode;
      if (key == 13) {
        this.searchEvent();
      }
    };
  },
  beforeRouteLeave (to, form, next) {
    document.onkeydown = null;
    next();
  },

  methods: {
    //  查询商品数量
    getGoodsNum(e){
		console.log(e)
		// return
       // const params = {
       //      id: e.id,
       //    }
          // this.$api.getGoodsCategoryIdList(params).then((res) => {
            // console.log(res, "查询商品数量")
              // if(res.data == 0){
                   this.$confirm('是否确定禁用该类目？', '提示', {
                      confirmButtonText: '确定',
                      cancelButtonText: '取消',
                      type: 'warning'
                    }).then(() => {
                      const params = {
                        id: e.id,
                      }
                      this.$api.categoryForbidden(params).then((res) => {
                        console.log(res, "禁用成功")
                        if (res.code == 0) {
                          this.$message.success("禁用成功")
                          this.getStaffList()
                        }
                      }).catch((err) => { console.log(err) })
                    }).catch(() => {
                  });
              // }else {
              //     this.dialogVisibleGoods=true
              //     this.goodsNumber = res.data
              // }
          // }).catch((err) => { console.log(err) })
    },
    selectState (e) {
      this.queryForm.status = e
      this.getStaffList()
    },
    setState (e) {
     //启用
        this.$confirm('是否确定启用该类目？', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          const params = {
            id: e.id,
          }
          this.$api.categoryEnable(params).then((res) => {
            if (res.code == 0) {
              this.$message.success("启用成功")
              this.getStaffList()
            }
            console.log(res, "启用成功")
          }).catch((err) => { console.log(err) })
        }).catch(() => {
        });
      
    },
    handleNodeClick (e) {
      console.log(e, "树形控件")
    },
    // 新增类目
    classifyAdd (formName) {

      this.$refs[formName].validate((valid) => {
        if (valid) {
          const data = {
            categoryNo: this.form.categoryNo,
            categoryName: this.form.categoryName,
            parentId: this.form.parentId,
            status: this.form.status
          }
          this.$api.categoryAdd(data).then((res) => {
            if (res.code == 0) {
              this.$message.success('新增成功！')
              this.addClassifyDialogVisible = false;
              this.getStaffList()
            } else {
              this.$message.error('新增失败！')
            }
          }).catch((err) => { console.log(err) })
        } else {
          console.log("带'*'号为必填");
          return false;
        }
      });
    },
    // 新增下级
    addSubordinate (formName) {
      if (this.toInfoDialogVisible == true && this.btnText == '新增下级') {//新增下级
        this.$refs[formName].validate((valid) =>   {
          if (valid) {
            const data = {
              categoryNo: this.ruleForm.categoryNo,
              categoryName: this.ruleForm.categoryName,
              parentId: this.rowId,
              status: this.ruleForm.status
            }
            this.$api.categoryAdd(data).then((res) => {
              if (res.code == 0) {
                this.$message.success('新增下级成功！')
                this.toInfoDialogVisible = false;
                this.getStaffList()
              } else {
                this.$message.error('新增下级失败！')
              }
            }).catch((err) => { console.log(err) })
          } else {
            console.log("带'*'号为必填");
            return false;
          }
        });
      } else {//编辑
        console.log("编辑")
        this.$refs[formName].validate((valid) => {
          if (valid) {
            const data = {
              categoryNo: null,
              categoryName: this.ruleForm.categoryName,
              parentId: this.ruleForm.value,
              status: this.ruleForm.status,
              id: this.rowId
            }
            this.$api.categoryEdit(data).then((res) => {
              if (res.code == 0) {
                this.$message.success('编辑成功！')
                this.toInfoDialogVisible = false;
                this.getStaffList()
              } else {
                this.$message.error('编辑失败！')
              }
            }).catch((err) => { console.log(err) })
          } else {
            console.log("带'*'号为必填");
            return false;
          }
        });
      }
    },
    // 新增分类级联选择的值
    handleChange (e) {
      console.log(e, "新增分类级联选择的值")
      this.form.parentId = e[e.length - 1]
      console.log(this.form.parentId, "lalalal")
    },
    // 新增下级级联选择值
    handleChangeSubordinate (e) {
      this.ruleForm.value = e[e.length - 1]
      console.log(e, "新增下级级联选择值")

    },
    // 新增下级/编辑关闭按钮
    handleCloseToInfo () {
      this.toInfoDialogVisible = false;
    },

    handleSelectPositionId (e) {
      console.log(e)
      this.queryForm.positionId = e;
      this.getStaffList()
    },
    // 新增分类级联选择器数据
    getCascadeDate () {
      const params = {
      }
      this.$api.categoryCascadeDate(params).then((res) => {
        console.log(res, "新增分类级联选择器数据")

        if (res.code == 0) {
          this.options = res.data
        }
      }).catch((err) => { console.log(err) })
    },
    getStaffList () {
		this.loading = true;
      const params = {
        pageNo: this.pageNo,
        pageSize: this.pageSize,
        categoryNo: this.queryForm.categoryNo,
        categoryName: this.queryForm.categoryName,
        parentId: 0,
        status: this.queryForm.status
      }
      this.$api.categoryQuery(params).then((res) => {
        if (res.code == 0) {
          this.tableData = res.data
        }
		this.loading = false;
        console.log(res)
      }).catch((err) => { 
		  this.loading = false;
		  console.log(err) 
		})
    },
    // 点击编辑获取分类数据
    compileClassify (ids) {
      const params = {
        id: ids
      }
      this.$api.categoryCompileClassify(params).then((res) => {
        console.log(res, "点击编辑拿到分类数据111")
        if (res.code == 0) {
          this.ruleForm.value = res.data.parentId
          this.ruleForm.categoryNo = res.data.categoryNo
          this.ruleForm.categoryName = res.data.categoryName
          this.ruleForm.parentId = res.data.parentId
          this.ruleForm.status = res.data.status
          this.rowId = res.data.id
          this.rowList = res.data.topCategoryList
          console.log(this.rowList, "点击编辑拿到分类数据22")
          if(res.data.level==1){
            this.forbidden=true
          }
        }
        console.log(res)
      }).catch((err) => { console.log(err) })
    },
    // 刷新
    refresh () {
      this.queryForm = {}
      this.queryForm.orgId = ""
      this.getStaffList()
      this.$forceUpdate();
    },
    // 返回
    back () {
      this.$router.go(-1)
    },
    filterNode (value, data) {
      if (!value) return true;
      return data.orgName.indexOf(value) !== -1;
    },
    // 编辑/新增下级
    compile (row, num) {
      if (num == 1) {//新增下级
        console.log(row, "下级")
        this.ruleForm.categoryNo = ""
        this.ruleForm.categoryName = ""
        this.ruleForm.parentId = ""
        this.cascaderValue = row.parentId
        this.rowList = [row]
        this.forbidden = true;
        this.btnText = '新增下级'
        this.rowId = row.id
        this.ruleForm.value = row.id
        setTimeout(() => {
          this.toInfoDialogVisible = true;
        }, 10);

      } else {//编辑
        this.compileClassify(row.id)
        this.toInfoDialogVisible = true;
        this.btnText = '编辑'
        this.forbidden = false
        console.log(this.rowList)
      }
    },

    // 新增分类
    addClassify () {
      this.addClassifyDialogVisible = true;
      this.form = {}
      this.form.status = "A"
      this.getCascadeDate()
         this.$nextTick(() => {
          this.$refs['form'].clearValidate()

        })

    },
    // 新增分类关闭弹框
    handleCloseAddClassify () {
      this.addClassifyDialogVisible = false
    },
      handleClose(){
        this.dialogVisibleGoods = false
      },
    is_null (content) {
      if (content) {
        return false;
      } else {
        return true;
      }
    },
    // 分页
    handleCurrentChange (val) {
      this.pageNo = val;
      this.getStaffList(this.orgCode);
    },
    handleSizeChange (val) {
      this.pageSize = val;
      this.getStaffList(this.orgCode);
    },
    /***是否正常下拉框的数据请求***/
    /***重置搜索***/
    reset () {
      this.queryForm = {}
      this.queryForm.orgId = ""
      this.pageSize = 10;
      this.pageNo = 1;
      this.getStaffList();
      this.forArr(this.tableData.list, false)//全部收起树形表格
    },
    /***搜索模拟数据***/
    searchEvent () {
      console.log(this.queryForm)
      // this.pageSize = 10;
      // this.pageNo = 1;
      this.getStaffList()
      this.forArr(this.tableData.list, true)//全部展开树形表格

    },
    /***搜索模拟数据***/
    forArr (arr, isExpand) {//展开树形表格
      arr.forEach(i => {
        this.$refs.theTable.toggleRowExpansion(i, isExpand)
        if (i.children) {
          this.forArr(i.children, isExpand)
        }
      })
    },


  },
};
</script>
<style scoped lang="scss">
.div1 {
  margin-left: -16px;
  background: url(../../../assets/breadcrumb2.png);
  width: 120px;
  height: 30px;
  text-align: center;
  line-height: 30px;
  color: #2d7edf;
}
.div2 {
  margin-left: -16px;
  background: url(../../../assets/breadcrumb1.png);
  width: 120px;
  height: 30px;
  text-align: center;
  line-height: 30px;
  color: #fff;
}
.el-menu-vertical-demo {
  width: 200px;
  overflow-y: scroll;
  height: 700px;
}
.el-menu-input {
  padding: 0 15px;
  background: #fff;
  /deep/ .el-input__inner {
    height: 30px;
    border: 1px solid #eee;
    margin: 10px 0;
  }
}
.el-menu-vertical-demo::-webkit-scrollbar {
  width: 0;
  height: 0;
}
.btnp {
  display: inline-block;
  vertical-align: middle;
  padding: 0 10px;
  color: #0083ef;
}
.btnp:hover {
  color: #4168e7;
  cursor: pointer;
}
.Box {
  display: flex;
  justify-content: flex-start;
  width: 100%;

  .table_tab {
    width: 100%;
    margin-bottom: 50px;
  }
}
.table {
  border-radius: 5px;
  width: 100%;
}
/deep/.distpicker-address-wrapper select {
  padding: 0rem 0.75rem;
  height: 30px;
  line-height: 30px;
  font-size: 15px;
}

/deep/ .expanded {
  background: #f5f7fa;
  color: #000;
}

/deep/.el-table__expanded-cell[class*="cell"] {
  padding: 0px 50px;
}
/deep/.el-table td,
.el-table th {
  text-align: left;
}
.header {
  display: flex;
  align-items: center;
  font-size: 18px;
  font-family: PingFang SC;
  font-weight: bold;
  color: #333333;
  padding-bottom: 10px;
}

.inquiry {
  background: #fff;
  padding: 10px 20px 10px 20px;
  border-radius: 5px;
  .el-form {
    margin-top: 10px;
  }
}
.inquiryTab {
  background: #fff;
  padding: 10px 20px 20px 20px;
  border-radius: 5px;
  .el-form {
    margin-top: 10px;
  }
  margin-top: 20px;
  .inquiryTab_header {
    display: flex;
    justify-content: space-between;
    /deep/ .el-button {
      height: 40px;
    }
  }
}

/deep/.el-table__expand-icon > .el-icon {
  color: transparent;
}

.table {
  margin-top: 10px;
  border: 1px solid #e8eaec;
  border-radius: 0;
  /deep/ .el-input--suffix .el-input__inner {
    background: #409eff;
    color: #fff;
    width: 104px;
    box-shadow: none;
  }
  /deep/ .el-button {
    padding: 10px 13px;
  }
}

.page {
  text-align: right;
  width: 100%;
  background: #f5f5f5;
  padding-right: 30px;
  position: fixed;
  bottom: 0px;
  right: 0px;
  z-index: 5;

  span {
    font-size: 14px;
    color: #666;
    display: inline-block;
    margin-left: 10px;
  }
  .el-pagination {
    display: inline-block;
    vertical-align: middle;
  }
}
.demo-table-expand {
  font-size: 0;
}
.demo-table-expand label {
  width: 200px;
  color: #99a9bf;
}
.demo-table-expand .el-form-item {
  margin-right: 0;
  margin-bottom: 0;
  width: 50%;
  text-align: left;
}
/deep/.el-table__row:hover {
  color: rgb(45, 125, 223);
}
/deep/.el-dialog__header {
  padding: 20px 20px 20px 20px;
  border-bottom: 1px solid #d9d9d9;
  font-family: PingFang SC;
  font-weight: bold;
  line-height: 25px;
  color: #333333;
}
/deep/.el-dialog {
  border-radius: 10px;
}
/deep/.el-dialog__headerbtn {
  top: 15px;
}
.headerbox {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  border-bottom: 1px solid #ededed;
  padding-bottom: 10px;
}
.title_left {
  width: 4px;
  height: 16px;
  background: #4c81eb;
  opacity: 1;
  margin-right: 10px;
}
.tabTitle {
  font-size: 18px;
  font-family: PingFang SC;
  font-weight: 400;
  line-height: 25px;
  color: #333333;
  opacity: 1;
  margin-top: 10px;
  margin-bottom: 20px;
}
.headerTitle {
  font-size: 18px;
  font-family: PingFang SC;
  font-weight: 400;
  color: #333333;
  opacity: 1;
  margin-top: 20px;
  margin-bottom: 15px;
}
/deep/.el-form-item__label {
  font-size: 14px;
  font-family: PingFang SC;
  font-weight: 400;
  color: #333333;
}
.red {
  color: #ff0000;
}
.green {
  color: #67c23a;
}

/deep/.el-input.is-disabled .el-input__inner {
  background-color: #fff;
  font-family: PingFang SC;
  font-weight: 400;
  color: #333333;
}
/deep/ .el-dialog__footer {
  border-top: 1px solid #d9d9d9;
  margin-top: -20px;
  padding-top: 20px;
}
/deep/.el-table thead {
  font-size: 16px;
  font-family: PingFang SC;
  font-weight: bold;
  line-height: 22px;
  color: #333333;
  opacity: 1;
}
/deep/.el-table th > .cell {
  text-align: left;
}
/deep/.updatedTime {
  text-align: center !important;
}
.btnClass{
  margin-top: 20px;
  display: flex;
  justify-content: right;
}
</style>